/*
    权限路由集合
*/

const authRoutes = [
	//==== 首页 ===
	{
		path: '/',
		redirect: '/dashbord',
	},

	//首页 - 仪表盘
	{
		path: '/dashbord',
		component: () => import('@/views/Layout'),
		meta: {
			title: '首页',
		},
		children: [
			{
				path: '',
				component: () => import('@/views/dashbord/Index'),
			},
		],
	},

	//综治管理
	{
		path: '/synthetical-manage',
		component: () => import('@/views/Layout'),
		redirect: '/synthetical-manage/organization-manage',
		children: [
			{
				path: 'organization-manage',
				component: () => import('@/views/synthetical-manage/organization-manage/Index'),
				meta: {
					title: '综治机构管理',
				},
			},
			{
				path: 'people-manage',
				component: () => import('@/views/synthetical-manage/people-manage/Index'),
				meta: {
					title: '综治人员管理',
				},
			},
			{
				path: 'grid-manage',
				component: () => import('@/views/synthetical-manage/grid-manage/Index'),
				meta: {
					title: '网格管理',
				},
			},
		],
	},

	//档案管理
	{
		path: '/archives-manage',
		component: () => import('@/views/Layout'),
		redirect: '/archives-manage/people-dashbord',
		children: [
			{
				path: 'people-dashbord',
				component: () => import('@/views/archives-manage/people-dashbord/Index'),
				meta: {
					title: '实有人口数据统计',
				},
			},
			{
				path: 'real-people',
				component: () => import('@/views/archives-manage/real-people/Index'),
				meta: {
					title: '实有人口',
				},
			},
			{
				path: 'car',
				component: () => import('@/views/archives-manage/car/Index'),
				meta: {
					title: '车辆档案',
					//缓存的组件名字
					name: 'archives-manage-car',
				},
			},
			{
				path: 'house',
				component: () => import('@/views/archives-manage/house/Index'),
				meta: {
					title: '房屋档案',
				},
			},
			{
				path: 'facilities',
				component: () => import('@/views/archives-manage/facilities/Index'),
				meta: {
					title: '设施档案',
				},
			},
			{
				path: 'device',
				component: () => import('@/views/archives-manage/device/Index'),
				meta: {
					title: '设备档案',
				},
			},
			{
				path: 'company',
				component: () => import('@/views/archives-manage/company/Index'),
				meta: {
					title: '单位档案',
				},
			},
			{
				path: 'community',
				component: () => import('@/views/archives-manage/community/Index'),
				meta: {
					title: '社区基础档案',
				},
			},
		],
	},

	//特殊人群
	{
		path: '/special-people',
		component: () => import('@/views/Layout'),
		redirect: '/special-people/people',
		children: [
			{
				path: 'dashbord',
				component: () => import('@/views/special-people/dashbord/Index'),
				meta: {
					title: '特殊人群数据统计',
				},
			},
			{
				path: 'people',
				component: () => import('@/views/special-people/people/Index'),
				meta: {
					title: '特殊人群',
				},
			},
		],
	},

	//通行记录
	{
		path: '/traffic-record',
		component: () => import('@/views/Layout'),
		redirect: '/traffic-record/people',
		children: [
			{
				path: 'people',
				component: () => import('@/views/traffic-record/people/Index'),
				meta: {
					title: '人行记录',
				},
			},
			{
				path: 'car',
				component: () => import('@/views/traffic-record/car/Index'),
				meta: {
					title: '车行记录',
				},
			},
		],
	},

	//事件管理
	{
		path: '/events-manage',
		component: () => import('@/views/Layout'),
		redirect: '/events-manage/events',
		children: [
			{
				path: 'events',
				component: () => import('@/views/events-manage/Index'),
				meta: {
					title: '事件管理',
				},
			},
		],
	},

	//校园安全
	{
		path: '/school-safe',
		component: () => import('@/views/Layout'),
		redirect: '/school-safe/dashbord',
		children: [
			{
				path: 'dashbord',
				component: () => import('@/views/school-safe/dashbord/Index'),
				meta: {
					title: '校园安全数据统计',
				},
			},
			{
				path: 'school-manage',
				component: () => import('@/views/school-safe/school-manage/Index'),
				meta: {
					title: '学校管理',
				},
			},
			{
				path: 'warning-events',
				component: () => import('@/views/school-safe/warning-events/Index'),
				meta: {
					title: '学校预警事件',
				},
			},
		],
	},

	//护路护线
	{
		path: '/guard-road',
		component: () => import('@/views/Layout'),
		redirect: '/guard-road/dashbord',
		children: [
			{
				path: 'dashbord',
				component: () => import('@/views/guard-road/dashbord/Index'),
				meta: {
					title: '护路护线数据统计',
				},
			},
			{
				path: 'road-manage',
				component: () => import('@/views/guard-road/road-manage/Index'),
				meta: {
					title: '路/线管理',
				},
			},
			{
				path: 'warning-events',
				component: () => import('@/views/guard-road/warning-events/Index'),
				meta: {
					title: '路/线预警事件',
				},
			},
		],
	},

	//预警中心
	{
		path: '/early-warning',
		component: () => import('@/views/Layout'),
		redirect: '/early-warning/dashbord',
		children: [
			{
				path: 'dashbord',
				component: () => import('@/views/early-warning/dashbord/Index'),
				meta: {
					title: '预警中心首页',
				},
			},
			{
				path: 'people-deploy',
				component: () => import('@/views/early-warning/people-deploy/Index'),
				meta: {
					title: '人员布控',
				},
			},
			{
				path: 'car-warning',
				component: () => import('@/views/early-warning/car-warning/Index'),
				meta: {
					title: '车辆预警',
				},
			},
		],
	},

	//系统管理
	{
		path: '/system-manage',
		component: () => import('@/views/Layout'),
		redirect: '/system-manage/user',
		children: [
			{
				path: 'user',
				component: () => import('@/views/system-manage/user/Index'),
				meta: {
					title: '用户管理',
				},
			},
			{
				path: 'role',
				component: () => import('@/views/system-manage/role/Index'),
				meta: {
					title: '角色管理',
				},
			},
			{
				path: 'note',
				component: () => import('@/views/system-manage/note/Index'),
				meta: {
					title: '日志管理',
				},
			},
		],
	},
];

export default authRoutes;
